<?php
class Zend_View_Helper_ShowClientIndex {
    public function showClientIndex($view) {

    	$client = $view->Client;
    	$str='';
    	$str .= '<a href="'.$view->url(array('controller'=>'client', 'action'=>'add')).'">Thêm khách hàng </a>';
        $str .= '<table width="960">';
		$str .= '<tr>';
 
        $str .= '<table id="product-table" border="0" cellpadding="0" cellspacing="0" width="100%">';
        $str .= '<tr>';
        $str .= '<th class="table-header-repeat line-left"><a href="">Id</a></th>';
        $str .= '<th class="table-header-repeat line-left minwidth-1"><a href="">Tên Khach Hang</a></th>';
        $str .= '<th class="table-header-repeat line-left minwidth-1"><a href="">telephone</a></th>';
        $str .= '<th class="table-header-repeat line-left"><a href="">address</a></th>';
        $str .= '<th class="table-header-repeat line-left">Thao tác</th>';	
		
      
        $str .= '</tr>';
       
        foreach ($client as $client) {
        	$str .= '<tr>'; 	
            $str .='<td>'.$client->client_id.'</th>';
			$str .='<td>'.$client->telephone.'</th>';
			$str .='<td>'.$client->address.'</th>';
			$str .= '<td class="options-width"><a class="icon-1 info-tooltip" href="'.$view->url(array('controller'=>'client', 'action'=>'edit', 'client_id'=>$client->client_id)).'" title="Sửa"></a> ';
            $str .= '<a class="icon-2 info-tooltip" href="'.$view->url(array('controller'=>'client', 'action'=>'delete','client_id'=>$client->client_id)).'" title="Xóa"></a></td>';       
            $str .='</tr>';
        }
        
        $str .= '</table>';
        
        return $str; 
        
        
    }
}